package com.keson.guard;

import android.app.Application;
import android.content.Context;
import android.content.Intent;
import android.os.Build;

import com.keson.guard.service.GuardService;
import com.liulishuo.filedownloader.FileDownloader;

public class GuardApplication extends Application {
    @Override
    public void onCreate(){
        super.onCreate();

        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
            startForegroundService(new Intent(this, GuardService.class));
        } else {
            startService(new Intent(this, GuardService.class));
        }

//        LogUtil.info("bug反馈","初始化完毕");

        FileDownloader.setup(getApplicationContext());
    }

    @Override
    public void attachBaseContext(Context base){
        super.attachBaseContext(base);
    }
}
